<!DOCTYPE html>

<html>



<head>

  <meta charset="utf-8">

  <title>SEO設定</title>

  <meta name="renderer" content="webkit">

  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <meta name="viewport"

    content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">

  <link rel="stylesheet" href="/public/static/layuiadmin/layui/css/layui.css" media="all">

  <link rel="stylesheet" href="/public/static/layuiadmin/style/admin.css" media="all">

  <style>
    .layui-form-label {
      width: 160px !important;
    }
    .layui-input-block {
      margin-left: 190px;
    }
  </style>

</head>



<body>

  <div class="layui-fluid">

    <div class="layui-row layui-col-space15">

      <div class="layui-col-md12">

        <div class="layui-card">

          <div class="layui-card-header">SEO設定</div>

          <div class="layui-card-body" pad15>

            <div class="layui-form" method="post" lay-filter="component-form-group" id="systemForm">

              <input type="hidden" name="id" value="{$info.id}" />

              <input type="hidden" name="module_id" value="{$params.module_id}" />

              <div class="layui-form-item">

                <label class="layui-form-label">ウェブサイトモジュール</label>

                <div class="layui-input-block">

                  <select name="mid" lay-verify="required" lay-filter="mid">

                    {volist name="modules" id="v"}

                    <option value="{$v.id}" {if $mid == $v.id}selected{/if}>{$v.title}</option>

                    {/volist}

                  </select>

                </div>

              </div>

              <div class="layui-form-item">

                <label class="layui-form-label">ウェブサイト名</label>

                <div class="layui-input-block">

                  <input type="text" name="web_title" value="{$info.web_title}" placeholder="ウェブサイト名を入力してください"

                    class="layui-input">

                </div>

              </div>

              <div class="layui-form-item">

                <label class="layui-form-label">キーワード</label>

                <div class="layui-input-block">

                  <input type="text" name="web_keywords" value="{$info.web_keywords}" placeholder="キーワードを入力してください"

                    class="layui-input">

                </div>

              </div>

              <div class="layui-form-item">

                <label class="layui-form-label">キーワードの説明</label>

                <div class="layui-input-block">

                  <input type="text" name="web_description" value="{$info.web_description}" placeholder="キーワードの説明を入力してください"

                    class="layui-input">

                </div>

              </div>

              <div class="layui-form-item layui-layout-admin">

                <div class="layui-input-block">

                  <div class="layui-footer" style="left: 0;">

                    <button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">保存</button>

                  </div>

                </div>

              </div>

            </div>

          </div>

        </div>

      </div>

    </div>

  </div>

  <script src="/public/static/layuiadmin/layui/layui.js"></script>

  <script>

    layui.config({

      base: '/public/static/layuiadmin/' // 静态资源所在路径

    }).extend({

      index: 'lib/index', // 主入口模块

      api: 'api'

    }).use(['index', 'form', 'set', 'api'], function () {

      var $ = layui.$,

        admin = layui.admin,

        element = layui.element,

        layer = layui.layer,

        api = layui.api,

        form = layui.form;



      form.render(null, 'component-form-group');

      form.on('select(mid)', function(data) {
        window.location.href="?module_id={$params.module_id}&mid=" + data.value
      });

      /* 监听提交 */

      form.on('submit(component-form-demo1)', function (data) {

        var dats = data.field;

        var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引

        layer.msg('読み込み中', {

          icon: 16,

          shade: 0.01

        });

        api.ajax('{:url("seoSave")}', 'post', 'json', dats, function (res) {

          layer.closeAll('loading');

          layer.msg(res.msg);

        });

        return false;

      });

    });

  </script>

</body>



</html>